#pragma once
#include <algorithm>
#include <iostream>
enum REDUCE_MODE {
    INTERLEAVE,
    UNROLL2,
    UNROLL4,
    UNROLL8,
    NEIGHBORED,
    WARP_UNROLL8,
    WARP_UNROLL8_OPT,
    WARP_SMEM_UNROLL8,
};

template <typename T> T reduce_sum_cpu(T *h_in, const unsigned int N);
template <typename T>
T reduce_sum_cuda(T *h_in, const unsigned int N, REDUCE_MODE mode = INTERLEAVE);
